package org.hadoop.seq;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.SequenceFile;
import org.apache.hadoop.io.SequenceFile.Reader;
import org.apache.hadoop.io.Text;
public class ReadSequenceFile {
    public static void main(String[] args) throws Exception {
        Configuration config = new Configuration();
        Reader.Option op1 = Reader.file(new Path("file:///D:/a/1.seq"));
        SequenceFile.Reader r = new SequenceFile.Reader(config,op1);
        IntWritable key = new IntWritable();
        Text value = new Text();
        while(r.next(key, value)) {
            System.out.println(key+","+value);
        }
        r.close();
    }
}